package com.mouse.remind;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;


public class AlarmAlertReceiver extends BroadcastReceiver {
	
	@Override
	public void onReceive(Context context, Intent intent) {
		Intent serviceIntent = new Intent(context, 
				AlarmBootReceiver.class);
		context.sendBroadcast(serviceIntent, null);
		
		Log.d(this.getClass().getSimpleName(),"start dialog");
		//StaticWakeLock.lockOn(context);
		AlarmAlertWakeLock.acquire(context);
		StaticKeyguardLock.disabledKeyguard(context);
		Bundle bundle = intent.getExtras();
		final AlarmModel alarm = (AlarmModel) bundle.getSerializable("alarm");
		Intent mIntent = new Intent(context, AlarmDialogActivity.class);
		mIntent.putExtra("alarm", alarm);
		mIntent.putExtra("isTime", true);
		mIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		context.startActivity(mIntent);
	}

}
